//初始化数据库,Sequelize提供了一个sync()方法，可以自动创建数据库。
const models = require('../../model');
//准备数据user
if(models.User){
  console.log("存在用户model user信息")
  let User = models.User;
  let user = User.create({
    "email": "191550636@qq.com",
    "pwd": "123456",
    "nickname":"zzq123",
    "sex":"0",
    "recipient":"张智泉",
    "address":"北京市海淀区",
    "phone":"18500944413",
    "headimg":"http://tvax4.sinaimg.cn/crop.0.0.480.480.180/768c39d5ly8fjje1d0teej20dc0dcq35.jpg"
  }).then(resp =>{
      user = resp;
      user.update({'nickname':'zhangzq'},{where:{'id':user.dataValues.id}})//更新查看更新时间和version
  }).catch(e =>{
    console.log(e);
  }).finally(() => {
    // process.exit(0);
  });
}